@import '../variables/default.scss';
@import '../mixins/index.scss';

$at-choose-location-prefixCls: '.at-choose-location';
$at-choose-location-map-height: 600px;

#{$at-choose-location-prefixCls} {
  &-layout {
    .at-float-layout__container {
      max-height: initial;

      .layout-body {
        height: 100vh;
        padding: 0;
        max-height: initial;

        .layout-body__content {
          max-height: initial;
        }
      }
    }
  }

  &-nav-bar {
    transition: all linear 0.1s;
    z-index: 10;

    &.hide {
      height: 0;
    }

    .at-nav-bar__left-view,
    .at-nav-bar__right-view {
      font-size: $font-size-base;
      color: inherit;
    }
  }

  &-search-bar {
    position: relative;
    z-index: 10;
  }

  &__overlay {
    @include overlay;

    z-index: 2;

    &.hide {
      display: none;
    }
  }

  .at-list__item {
    font-size: $font-size-slg;

    &.selected {
      color: $color-brand;

      .item-content__info-note {
        color: inherit;
      }
    }

    .item-content__info-note,
    .item-content__info-title {
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .item-content__info-note {
      font-size: $font-size-sm;
    }

    .item-extra {
      width: auto;
      flex: 0 0 auto;
      padding-left: $spacing-h-xl;

      .item-extra__info {
        padding-right: 0;
        color: inherit;
      }
    }
  }

  &-search-list {
    position: absolute;
    top: 80px;
    left: 0;
    bottom: 0;
    right: 0;
    background: #fff;
    z-index: 9;
  }

  &-map {
    height: $at-choose-location-map-height;
    position: relative;

    &-location {
      position: absolute;
      width: 50px;
      height: 71px;
      z-index: 2;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }

    &-container {
      height: 100%;
    }
  }

  &-nearby-list {
    height: calc(100vh - #{$at-nav-bar-height} - 80px - #{$at-choose-location-map-height});
  }

  .amap-logo,
  .amap-copyright {
    display: none !important;
  }

  .amap-controls {
    z-index: 1;

    .amap-geolocation-con {
      z-index: 1 !important;
    }
  }
}
